package cn.service;

import cn.dao.StudentDao;
import cn.entity.Student;

import java.sql.SQLException;
import java.util.List;

public class StudentService {
    private final StudentDao dao=new StudentDao();

    public List<Student> getAll() throws SQLException {
        return dao.getAll();
    }
    public void addStudent(Student student){
        dao.addStudent(student);
    }

    public void UpdateStudent(Student student){
        dao.updateStudent(student);
    }

    public void deleteStudent(int id) throws SQLException{
        dao.deleteStudent(id);
    }
}
